{extend name="app/shop/view/base.html"/}
{block name="resources"}
<style>
	.layui-table[lay-skin=line] {margin-top: 15px; border-width: 0;}
	.ns-align-right {text-align: right!important;}
	.goods-title{display: flex;align-items: center;}
	.goods-title .goods-img{display: flex;align-items: center;justify-content: center;width: 55px;height: 55px;margin-right: 5px;}
	.goods-title .goods-img img{max-height: 100%;max-width: 100%;}
	.goods-title .goods-name{flex: 1;line-height: 1.6;}
</style>
{/block}
{block name="main"}
<div class="ns-detail-card ns-tips">
	<div class="ns-detail-con">
		<p class="ns-detail-line">
			活动状态：<span class="ns-text-color">
				{if condition="$present_info.data.status == 1"}未开始{/if}
				{if condition="$present_info.data.status == 2"}进行中{/if}
				{if condition="$present_info.data.status == 3"}已结束{/if}</span>
		</p>
		<p class="ns-detail-line">活动时间：{:date('Y-m-d H:i:s', $present_info.data.start_time)} — {:date('Y-m-d H:i:s', $present_info.data.end_time)}</p>

	</div>
</div>

<table class="layui-table" id="goods" lay-skin="line" lay-size="lg">
	<colgroup>
		<col width="40%">
		<col width="20%">
		<col width="20%">
		<col width="20%">
	</colgroup>
	<thead>
		<tr>
			<th>商品名称</th>
			<th>商品价格(元)</th>
			<th>商品库存</th>
			<th>发放数</th>
		</tr>
	</thead>
	<tbody>
		{foreach name=$present_info.data.sku_list as $k => $v}
			<tr data-sku_id="{$v.sku_id}">
				<td>
					<div class="goods-title">
						<div class="goods-img">
							{if $v['sku_image']}
							<img layer-src src="{:img($v.sku_image)}" alt="">
							{else/}
							<img layer-src src="" alt="">
							{/if}
						</div>
						<p class="ns-multi-line-hiding goods-name">{$v.sku_name}</p>
					</div>
				</td>
				<td class="price">{$v.price}</td>
				<td>{$v.stock}</td>
				<td>{$v.sale_num}</td>
			</tr>
		{/foreach}
	</tbody>
</table>
{/block}
{block name="script"}
{/block}